<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>document</title>
    <meta charset="UTF-8">
    <script type="text/javascript">
        window.onload=function () {
            document.getElementById("myheader").onclick=function () {
                getvalue();
            }
            function getvalue() {
                var omyheader=document.getElementById("myheader");
                alert(omyheader.firstChild.nodeValue);
            }
        }
    </script>
</head>
<body>
    <script type="text/javascript">
        document.write("<h3>大家好</h3>");
    </script>
    <span>文档标题：</span>
    <script type="text/javascript">
        document.write(document.title+"<br>");
    </script>
    <span>文档URL：</span>
    <script type="text/javascript">
        document.write(decodeURI(document.URL)+"<br>");
    </script>
    <span>文档域名：</span>
    <script type="text/javascript">
        document.write(document.domain+"<br>");
    </script>
    <h3 id="myheader">这是标题，单击一下</h3>
    <a id="1" name="1">这是第一个锚</a><br>
    <a id="2" name="2">这是第二个锚</a><br>
    <a id="3" name="3">这是第三个锚</a><br>
    <span>文档中的锚数：</span>
    <script type="text/javascript">
        document.write(document.anchors.length+"<br>");
    </script>
    <span>文档中的第一个锚：</span>
    <script type="text/javascript">
        document.write(document.anchors[0].innerHTML+"<br>");
    </script>
    <form id="f1" name="f1"></form>
    <form id="f2" name="f2"></form>
    <form id="f3" name="f3"></form>
    <script type="text/javascript">
        document.write("文档包含："+document.forms.length+"个表单"+"<br>")
    </script>
</body>
</html>